import { BehaviorSubject } from 'rxjs';

const globalStoreData = {
  cacheRouter: {},
  systemData: new BehaviorSubject({}),
  data: new BehaviorSubject({}),
};

function globalStore(key?: 'data' | 'systemData' | 'cacheRouter') {
  return globalStoreData[key ?? 'data'];
}

export { globalStore };
